package com.ldzy.dao;

import com.ldzy.pojo.Client;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Service;

import java.util.List;

public interface ClientMapper {
    @Insert("insert into client (name,sex,age,phone) values (#{name},#{sex},#{age},#{phone})")
    @Results(value = {
            @Result(id = true, property = "id", column = "id"),
            @Result(property = "name", column = "name"),
            @Result(property = "sex", column = "sex"),
            @Result(property = "age", column = "age"),
            @Result(property = "phone", column = "phone")
    })
    void add(Client client);
    @Select("select * from client")
    List<Client> getAll();
}
